Skip to content

CM-67318: Warn when env vars override configured credentials#474

Merged
ilia-cy merged 1 commit into
mainfrom
CM-67318-warn-env-var-override-in-configure
Jun 21, 2026
Merged

CM-67318: Warn when env vars override configured credentials#474
ilia-cy merged 1 commit into
mainfrom
CM-67318-warn-env-var-override-in-configure

Conversation

@ilia-cy

@ilia-cy ilia-cy commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • cycode configure writes credentials to ~/.cycode/credentials.yaml, but CYCODE_CLIENT_ID/CYCODE_CLIENT_SECRET (and the API/APP URL env vars) take precedence on every subsequent call. The override notice was previously only appended to the success message when a value actually changed, so a stale env var could silently shadow freshly configured credentials with no warning.
  • Split the env-var override notice out of the success messages into dedicated helpers (get_credentials_environment_variables_override_warning / get_urls_environment_variables_override_warning).
  • configure now prints these as Warning: lines whenever the relevant env vars are set — regardless of whether anything was updated (also covers the partial case where only the client id is set).
  • Env-over-file precedence is intentional (CI/CD), so it is unchanged; this only adds the missing warning.
  • Added tests/cli/commands/configure/test_messages.py covering the new helpers.

Jira

CM-67318

🤖 Generated with Claude Code

cycode configure writes credentials to the file but CYCODE_CLIENT_ID/
CYCODE_CLIENT_SECRET (and the URL env vars) take precedence on every
subsequent call. Previously the override notice was only appended to the
success message when a value actually changed, so a stale env var could
silently shadow freshly configured credentials with no indication.

Split the override notice into its own helpers and print it as a warning
whenever the relevant env vars are set, regardless of whether anything
was updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ilia-cy ilia-cy self-assigned this Jun 21, 2026
@ilia-cy ilia-cy merged commit d7f4076 into main Jun 21, 2026
28 checks passed
@ilia-cy ilia-cy deleted the CM-67318-warn-env-var-override-in-configure branch June 21, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants